﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SlimDX.Direct3D11;

namespace ParticlesEngine.Core
{
    public class SceneManager :IDisposable
    {
        DeviceContext context;
        Device device;
        List<Scene> scenes = new List<Scene>();

        public SceneManager(Device device, DeviceContext context)
        {
            this.device = device;
            this.context = context;
        }

        public void Initialize()
        {
        }

        public void Draw()
        {
            foreach (Scene scene in scenes)
            {
                scene.Draw();
            }
        }

        public void Update()
        {
            foreach (Scene scene in scenes)
            {
                scene.Update();
            }
        }

        public void AddScene(Scene scene)
        {
            scene.device = this.device;
            scene.context = this.context;
            this.scenes.Add(scene);
        }

        public void Dispose()
        {
            foreach (Scene scene in scenes)
            {
                scene.Dispose();
            }
        }

    }
}
